
import { Link,useNavigate} from 'react-router-dom'
function Login() {

    const navigate=useNavigate();
    const reg=()=>{

        navigate("/reg");
    }
    const show=()=>{
        navigate("/home/test/9999");
    }
    const stu=()=>{
        // navigate("/home/stu",{state:{id:3}});
        navigate("/home/stu?id=88888&type=news")
    }
    return (
        <div>
            登录页面
            <div>
                <Link to="/reg">注册</Link>

                <Link to="/home/test/20000">详情</Link>

                <button onClick={show}>详情</button>

                <button onClick={reg}>注册</button>

                <button onClick={stu}>stu</button>
            </div>
        </div>
    )

}
export default Login